//
//  ReadDetailTableViewCell.m
//  A_Project_DLS151129_SQ
//
//  Created by 151129-49宋强 on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com蓝鸥. All rights reserved.
//

#import "ReadDetailTableViewCell.h"

@implementation ReadDetailTableViewCell

- (void)dealloc
{
    [_titleLabel release];
    [_contentLabel release];
    [_imgView release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:@"cell"];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        // _imgView.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_imgView];
        [_imgView release];
        self.titleLabel = [[UILabel alloc] init];
        // _titleLabel.backgroundColor = [UIColor redColor];
        _titleLabel.font = [UIFont boldSystemFontOfSize:20];
        [self.contentView addSubview:_titleLabel];
        [_titleLabel release];
        self.contentLabel = [[UILabel alloc] init];
        // _contentLabel.backgroundColor = [UIColor redColor];
        _contentLabel.numberOfLines = 3;
        [self.contentView addSubview:_contentLabel];
        [_contentLabel release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _titleLabel.frame = CGRectMake(10, 10, self.frame.size.width - 10, 30);
    CGRect h = _titleLabel.frame;
    _imgView.frame = CGRectMake(10, 10 + h.size.height + 10, self.frame.size.width - 10 - 180, 80);
    CGRect hh = _imgView.frame;
    _contentLabel.frame = CGRectMake(10 + hh.size.width + 5, hh.origin.y, self.frame.size.width - 10 - hh.size.width - 5 - 5, hh.size.height);
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
